-- GENERATED SPELL FOR [Bloodscale Enchantress] --


function spell0_18088(pUnit, Event) --@Arcane Missiles,n/a--
pUnit:FullCastSpellOnTarget(34447,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18088', 597, 1)
end

function spell1_18088(pUnit, Event) --@Freezing Circle,n/a--
if charge_disp ~= 'na' then
pUnit:FullCastSpellOnTarget(34787,pUnit:GetMainTank ())
local charge_disp = 'na'
end
pUnit:RegisterEvent('Sorts_18088', 1, 1)
end

function spell2_18088(pUnit, Event) --@Ice Barrier,Self--
pUnit:FullCastSpellOnTarget(33245,pUnit)
pUnit:RegisterEvent('Sorts_18088', 30332, 1)
end

function Sorts_18088(pUnit, Event)
local choix_sorts_18088 = math.random(0, 2)
if choix_sorts_18088 == 0 then
pUnit:RegisterEvent('spell0_18088', 1, 1)
end
if choix_sorts_18088 == 1 then
pUnit:RegisterEvent('spell1_18088', 1, 1)
end
if choix_sorts_18088 == 2 then
pUnit:RegisterEvent('spell2_18088', 1, 1)
end
end

function mob18088_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_18088', math.random(1500, 3000), 1)
end

function mob18088_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18088_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18088_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(18088, 1, 'mob18088_Action')
RegisterUnitEvent(18088, 2, 'mob18088_Leave')
RegisterUnitEvent(18088, 3, 'mob18088_Kill')
RegisterUnitEvent(18088, 4, 'mob18088_Die')
